#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<iostream>
using namespace std;
int BinarySearch(int* arr, int i, int j, int val)
{
	int mid = (i + j) / 2;
	if (arr[mid] == val) {
		return mid;
	}
	else if (i > j) {
		return -1;
	}
	else if (arr[mid] > val) {
		return BinarySearch(arr, i, mid - 1, val);
	}
	else
		return BinarySearch(arr, mid+1, j, val);
}



//n!
int a(int n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * a(n - 1);
	}
}
int main() {
	int m = a(3);
	printf("%d\n", m);}
